Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

OlapMeasure OLAP Operator Values and OlapMeasureInput Keywords and Objects or Values

The OLAP operator value of an OlapMeasure specifies the operation by which an analytic workspace calculates the values of the OlapMeasure. All of the operations reference a Measure that supplies the values upon which the calculation is based and a time Dimension that dimensions the Measure. Some of the operations also reference a Hierarchy or Level of the Dimension, or a scalar or other value that affects the calculation. Each of these referenced objects or values is represented by a separate OlapMeasureInput that is owned by the OlapMeasure.

An OlapMeasureInput has a keyword that identifies the referenced object or value. You specify the keyword with the setKeyWord method. You specify a referenced Measure, Dimension, Hierarchy, or Level with the setReferencedObj method. You specify a scalar or other value with the setScalarValue method.

In the following table, the left column lists the valid values for the OLAP operator of an OlapMeasure. The middle columns have the OlapMeasureInput keyword and referenced object or scalar value pairs that the OlapMeasure requires for the operation specified by the OLAP operator value. The right column contains brief descriptions of the operations.

OLAP Operator Value OlapMeasureInput Keyword OlapMeasureInput
Referenced Object
or Value
Description
CUMULATIVE_TOTAL_PARENT
CUMULATIVE_TOTAL_TOTAL
MEASURE The Measure that is the base of the operation. For each member of the Hierarchy, calculates the total of the values of the Measure that are specified by the selected members.

CUMLATIVE_TOTAL_TOTAL selects the current member and all of the members that are at the same level as the current member and that have an end date that is less than that of the current member.

CUMULATIVE_TOTAL_PARENT selects the current member and the members that are at the same level as the current member, that have an end date that is less than that of the current member, and that have the same parent as the current member.

DIMENSION A time Dimension that dimensions the Measure.
HIERARCHY A Hierarchy that is owned by the time Dimension.
LAG
LEAD
MEASURE The Measure that is the base of the operation. For each member of the Dimension, selects the value of the Measure that is specified by the dimension member that is at the same level and that is at the OFFSET number of positions away from the current member. A LAG operation selects the value for a member that has an end date that is less than that of the current member. A LEAD operation selects the value for a member that has an end date that is greater than that of the current member.

For example, if the operator is LAG and the Measure is UNITS_AW and the Dimension is TIME_AW and the OFFSET value is 2, then the value of the OlapMeasure for June, 2002 is the value of UNITS_AW for April, 2002. If the operator is LEAD, then for the same inputs the OlapMeasure value for June, 2002 is the value of UNITS_AW for August, 2002.

DIMENSION A time Dimension that dimensions the Measure.
OFFSET A scalar value that specifies the number of time members that is the offset for the lag or lead operation.
MOVINGAVERAGE
MOVINGMAX
MOVINGMIN
MOVINGTOTAL
MEASURE The Measure that is the base of the operation. For each member of the Dimension, performs a calculation on the range of Measure values that are specified by the selected Dimension members.

MOVINGAVERAGE calculates the average of the values in the range.

MOVINGMAX selects of the maximum value in the range.

MOVINGMIN selects of the minimum value in the range.

MOVINGTOTAL calculates the total of the values in the range.

The START and STOP values specify the positions of the dimension members that are at the beginning and the end of the range of members to select. The values are relative to the position of current dimension member.

The STEP value specifies which Measure values in the range to include in the calculation. A STEP value of 1 includes every value in the range. A value of 2 includes in the first value, the third value, the fifth value, and so on. For example, if the current month is June 1999, the START value is 3, and the STOP value is 5, then a STEP value of 2 specifies that the calculation includes the values for March 1999, May 1999, July 1999, September 1999, and November 1999.

DIMENSION A time Dimension that dimensions the Measure.
START A scalar value that specifies an offset from the position of the current time Dimension member.
STOP A scalar value that specifies an offset from the position of the current time Dimension member.
STEP A scalar value that specifies which values in the range to include in the calculation.
PERIOD_TO_DATE MEASURE The Measure that is the base of the operation. For each member of the Level, performs a calculation on the Measure values that are specified by the members that are in a period that includes the current Level member and all of the Level members that have same parent and that have an end date that is less than that of the current member.

The OPERATION values indicates the type of calculation perform, as follows.

  • AVERAGE specifies averaging the values in the period.
  • LARGEST specifies selecting the largest value in the period.
  • SMALLEST specifies selecting the smallest value in the period.
  • TOTAL specifies totaling the values in the period.
DIMENSION A time Dimension that dimensions the Measure.
HIERARCHY A Hierarchy that is owned by the time Dimension.
LEVEL A Level that is owned by the Hierarchy.
OPERATION A String that specifies the operation. Valid values are the following:
  AVERAGE
  LARGEST
  SMALLEST
  TOTAL
FUTURE_PERIOD
PRIOR_PERIOD
PRIOR_PERIOD_VARIANCE
PRIOR_PERIOD_VARIANCE_PERCENTAGE
MEASURE The Measure that is the base of the operation. For each member of the Hierarchy, selects the value of the Measure that is specified by the member of the hierarchy that is at the same level, that is at the OFFSET number of positions away from the current member, and that has an end date that is less than that of the current member, for prior periods, or that is greater than that of the current member for a future period.

FUTURE_PERIOD specifies selecting the value of the Measure that is specified by the member that is at the OFFSET number of positions after the current member.

PRIOR_PERIOD specifies selecting the value of the Measure that is specified by the member that is at the OFFSET number of positions before the current member.

PRIOR_PERIOD_VARIANCE specifies subtracting the value for the prior period from the value for the current member.

PRIOR_PERIOD_VARIANCE_PERCENTAGE specifies dividing the value for the current member by the value for the prior period.

DIMENSION A time Dimension that dimensions the Measure.
HIERARCHY A Hierarchy that is owned by the time Dimension.
OFFSET A scalar value that specifies a period before or after the current period.
RANK_LEVEL
RANK_PARENT
RANK_TOTAL
MEASURE The Measure that is the base of the operation. Ranks the values of the Measure specified by the selected members of the Hierarchy. These operations produce an OlapMeasure that has, for each selected member, the rank of the value of the base Measure for that member.

A DIRECTION value of LH specifies that the ranking proceeds from the lowest to the highest value so that the lowest value has the rank of 1.

A DIRECTION value of HL specifies that the ranking proceeds from the highest to the lowest value so that the highest value has the rank of 1.

RANK_LEVEL specifies calculating the rank relative to the other members that are in the same level as the current member.

RANK_PARENT specifies calculating the rank relative to the other members that have the same parent as the current member.

RANK_TOTAL specifies calculating the rank relative to all of the members of the Hierarchy.

DIMENSION A time Dimension that dimensions the Measure.
HIERARCHY A Hierarchy that is owned by the time Dimension.
DIRECTION A String that specifies the direction of the ranking, either highest to lowest or lowest to highest. The values for this keyword are HL or LH.
SAME_PERIOD_ANCESTORS_AGO
SAME_PERIOD_ANCESTORS_AGO_VARIANCE
SAME_PERIOD_ANCESTORS_AGO_VARIANCE
_PERCENT

SAME_PERIOD_ANCESTORS_AGO_FVD
MEASURE The Measure that is the base of the operation. For each member of the Hierarchy, selects the value of the Measure that is specified by the member of the hierarchy that is in the same level as the current member, and that is in the position relative to the ancestor that is the OFFSET number of positions away from the ancestor of the current member. The ancestor is determined by the referenced Level.

If the current member is a member of the referenced LEVEL, these operations select the member that is the OFFSET number of positions away from the current member.

If the current member is a member of a LEVEL that is higher than the referenced LEVEL, then no member is selected and the OlapMeasure value for the current member is NA. For example, if the referenced LEVEL is the Quarter level and the current member belongs to the Year level, then the OlapMeasure value for the year member is NA.

To illustrate the various members that an operation selects depending on the referenced Level, the following table shows the members of a calendar hierarchy of a time dimension that the SAME_PERIOD_ANCESTORS_AGO operation selects for different Level objects. In the operation, the OFFSET value is 3.

Current
Member
Referenced
Level
Selected
Member
June 2004 Year June 2001
Quarter September 2003
Month March 2004
Q4 2004 Year Q4 2001
Quarter Q1 2004
Month -
2004 Year 2001
Quarter -
Month -

SAME_PERIOD_ANCESTORS_AGO selects the member at the OFFSET number of positions before the current member. The value of the OlapMeasure for the current member is the value of the base Measure for the selected member.

SAME_PERIOD_ANCESTORS_AGO_FVD selects the member at the OFFSET number of positions after the current member. The value of the OlapMeasure for the current member is the value of the base Measure for the selected member.

SAME_PERIOD_ANCESTORS_AGO_VARIANCE selects the member at the OFFSET number of positions before the current member. The value of the OlapMeasure for the current member is the value of the base Measure for the current member minus the value for the selected member.

SAME_PERIOD_ANCESTORS_AGO_VARIANCE_PERCENT selects the member at the OFFSET number of positions before the current member. The value of the OlapMeasure for the current member is the value of the base Measure for the current member divided by the value for the selected member.

DIMENSION A time Dimension that dimensions the Measure.
HIERARCHY A Hierarchy that is owned by the time Dimension.
OFFSET A scalar value that specifies the number of time members that is the offset for the prior period operation.
SHARE_TO_LEVEL MEASURE The Measure that is the base of the operation. For each member of the Level, calculates the percentage that the value for the member represents of the total value of the base Measure for the members of the Level.
DIMENSION A time Dimension that dimensions the Measure.
HIERARCHY A Hierarchy that is owned by the time Dimension.
LEVEL A Level that is owned by the Hierarchy.
SHARE_TO_PARENT
SHARE_TO_TOTAL
MEASURE The Measure that is the base of the operation. For each member of the Hierarchy, calculates the percentage that the value for the member represents of the total value of the base Measure for the selected members.

SHARE_TO_PARENT calculates the percentage that the value specifed by the current member represents of the total value of the Measure for the members of the Hierarchy that have the same parent as the current member.

SHARE_TO_TOTAL calculates the percentage that the value specifed by the current member represents of the total value of the Measure for all of the members of the Hierarchy.

DIMENSION A time Dimension that dimensions the Measure.
HIERARCHY A Hierarchy that is owned by the time Dimension.
YEAR_TO_DATE MEASURE The Measure that is the base of the operation. For each member of the Dimension, calculates the total of the values of the Measure that are specified by the current member and all of the members that are at the same Level as the current member, that have the same year as an ancestor, and that have an end date less than that of the current member.
DIMENSION A time Dimension that dimensions the Measure.

Copyright © 2003, 2005, Oracle. All rights reserved.